package day03;

import java.util.Scanner;

public class practice {
    public static void main(String[] args) {
        /*
        System.out.println(5%2);
        System.out.println(8%2);
        System.out.println(2%8);

        int a=5,b=5;
        a++;
        ++b;
        System.out.println(a);
        System.out.println(b);

        a--;
        --b;
        System.out.println(a);
        System.out.println(b);

        int c=a++;
        int d=++b;
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        System.out.println(d);

        c=a--;
        d=--b;
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        System.out.println(d);

         */
        /*
        int a=5,b=10,c=5;
        boolean b1=b>a;
        System.out.println(b1);
        System.out.println(c<b);
        System.out.println(a>b);
        System.out.println(b>=c);
        System.out.println(c<=a);
        System.out.println(a==b);
        System.out.println(a!=b);

        System.out.println(a+c>b);
        System.out.println(b%2==0);
        System.out.println(c++>5);
        System.out.println(c++>5);

         */
/*
        int a=5,b=10,c=5;
        boolean b1=b>=a &&b<c;
        System.out.println(b1);
        System.out.println(b<=c && b>a);
        System.out.println(a==b && c>b);
        System.out.println(b!=c && a<b);

        System.out.println(b>=a || b<c);
        System.out.println(b<=c || b>a);
        System.out.println(b!=c || a<b);
        System.out.println(a==b || c>b);

        boolean b2 = !(a<b);
        System.out.println(b2);
        System.out.println(!(a>b));

        boolean b3 = a>b && c++>2;
        System.out.println(b3);
        System.out.println(c);

        boolean b4 = a<b || c++>2;
        System.out.println(b4);
        System.out.println(c);

 */
        /*
        int a = 5;
        a += 10;
        System.out.println(a);
        a *= 2;
        System.out.println(a);
        a /= 6;
        System.out.println(a);

        short s = 5;
//        s=s+10; //没有强转
        s += 10;

         */
        /*
        int age = 38;
        System.out.println("age=");
        System.out.println(age);
        System.out.println("age="+age);
        System.out.println("我的年龄是"+age);
        System.out.println("我今年"+age+"岁了");

        String name = "gxh";
        System.out.println("name="+name);
        System.out.println("大家好，我叫"+name);
        System.out.println("大家好，我叫"+name+"，今年"+age+"岁了");

        System.out.println(10+20+""+30);
        System.out.println(""+10+20+30);
        System.out.println(10+20+30+"");
         */
        /*
        int num = 5;
        int flag = num>0?1:-1;
        System.out.println(flag);

        int a=8,b=5;
        int max = a>b?a:b;
        System.out.println("max="+max);

         */
        /*
        double price = 300.0;
        if(price>=500){
            price*=0.8;
        }
        System.out.println("最终消费金额为："+price);

        int score =555;
        if(score>=0 && score<=100){
            System.out.println("成绩合法");
        }
        System.out.println("继续执行...");\

         */
        /*
        double price = 300.0;
        if(price<=500){
            price*=0.8;
        }else {
            price*=0.7;
        }
        System.out.println("最终消费金额为："+price);

        int score = 95;
        if(score>=0 && score<=100){
            System.out.println("是合法成绩");
        }else {
            System.out.println("是不合法成绩");
        }

         */
/*
        double peice = 6000.0;
        if(peice>=2000){
            peice*=0.5;
        } else if (peice>=1000) {
            peice*=0.7;
        } else if (peice>=500) {
            peice*=0.8;
        } else{
            peice*=0.9;
        }
        System.out.println("最终消费金额为："+peice);

 */
        /*
        int a=89,b=36;
        int max=a>b?a:b;
        System.out.println("max="+max);

        if(a>b){
            System.out.println("max="+a);
        }else {
            System.out.println("max="+b);
        }
        int years=2001;
        if((years%4==0 && years%100!=0) || years%400==0){
            System.out.println("是闰年");
        }else {
            System.out.println("不是闰年");
        }
        int score=-46;
        if(score>100 || score<0) {
            System.out.println("成绩不合法");
        }else if(score>=90){
            System.out.println("成绩大于等于90");
        } else if (score>=80) {
            System.out.println("成绩大于等于80并且小于90");
        } else if (score>=60) {
            System.out.println("成绩大于等于60并且小于80");
        } else {
            System.out.println("成绩小于60");
        }

         */
        //两数交换
        /*
        int a=6,b=9;
        int c;
        c=a;
        a=b;
        b=c;
        System.out.println("交换a,b的值a为:"+a+",b为："+b);

         */

        Scanner ac = new Scanner(System.in);
        System.out.println("输入第一个数");
        double a = ac.nextInt();
        System.out.println("输入第二个数");
        double b = ac.nextInt();
        System.out.println("两数之和为："+(a+b));

    }
}


